import * as proxy from '../proxy';
import ServiceBase from '../base';
import ActivityPageProxy from '../proxies/activity-page-proxy';

const ACTIVITY = '/events/search';

class ActivityService extends ServiceBase {
    getActivityPage = (data) => {
        let promise = super.post({
            url: `/accounts/${data.accountId}/projects/${data.projectId}${ACTIVITY}?pageSize=${data.pageSize}&pageNumber=${data.pageNumber}`,
            data: data.data,
        });
        return proxy.httpResultProxy(promise, ActivityPageProxy);
    };
}

export {ActivityService};
